﻿/*
 * 文件名:Login.cs
 * 类名:XHCTMS.DAL.Login
 * 创建人: 杨航
 * 创建时间: 2013-7-3 20:18:13
 * 
 * 最近更新：2013-7-3 20:18:20
 * 更新内容：
 * 
 * 备注: 
 * 
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace XHCTMS.DAL
{
    /// <summary>
    /// 登陆
    /// </summary>
    public class Login
    {
        public string Validation(string userName)
        {
            StringBuilder queryString = new StringBuilder();
            queryString.Append(@"select user_pwd from [user] where [user_name] = @UserName");
            SqlParameter[] paras = {
                                       new SqlParameter("@UserName", SqlDbType.NVarChar, 32)
                                   };
            paras[0].Value = userName;
            return new DBHELP.Common().GetDataScalar(queryString.ToString(), paras);
        }
    }
}
